package MementoPattern;

import java.util.concurrent.CopyOnWriteArrayList;

public class Main {
    public static void main(String[] args) {
        CareTaker careTaker = new CareTaker();
        Original original = new Original();
        original.setStatus("1");
        careTaker.add(original.saveToMemento());
        original.setStatus("2");
        original.setStatus("3");
        careTaker.add(original.saveToMemento());

        System.out.println(careTaker.getMemento(1).getStatus());
    }
}
